package com.example.nettry.demo.demo;

import io.netty.channel.ChannelInitializer;
import io.netty.channel.socket.SocketChannel;

/**
 * @author Eastern unbeaten
 * @email chenshiyun2011@163.com
 * @date 2019-10-04 13:59
 */
public class ChildChannelHandler extends ChannelInitializer<SocketChannel> {

    @Override
    protected void initChannel(SocketChannel ch) throws Exception {
        //初始化的时候调用自定义的handler
        ch.pipeline ().addLast (new TimeServerHandler());
    }
}
